package com.oocl.scan.utils;

import com.oocl.scan.model.Component;
import com.oocl.scan.model.Relationship;

import java.util.SplittableRandom;

public class ComponentRelationUtil {

    public static Component buildComponent(String name, String description, String domain, String module, String type){
        Component component = new Component();
        component.setName(name);
        component.setDescription(description);
        component.setDomain(domain);
        component.setModule(module);
        component.setType(type);
        return component;
    }

    public static Relationship buildRelationship(String type, Object description, String from, String fromModule, String to, String toModule){
        Relationship relationship = new Relationship();
        relationship.setType(type);
        relationship.setDescription(description);
        relationship.setFrom(from);
        relationship.setFromModule(fromModule);
        relationship.setTo(to);
        relationship.setToModule(toModule);

        return relationship;
    }
}
